package com.yuandengta.yomall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yuandengta.common.utils.PageUtils;
import com.yuandengta.yomall.product.entity.BrandEntity;
import com.yuandengta.yomall.product.entity.CategoryBrandRelationEntity;

import java.util.List;
import java.util.Map;

/**
 * 品牌分类关联
 *
 * @author kevin
 * @email 178676392@qq.com
 * @date 2020-12-20 17:30:25
 */
public interface CategoryBrandRelationService extends IService<CategoryBrandRelationEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 获取品牌关联的所有分类
     * @param brandId
     * @return
     */
    List<CategoryBrandRelationEntity> list(Long brandId);

    /**
     * 新增品牌分类
     * @param categoryBrandRelation
     */
    void saveDetail(CategoryBrandRelationEntity categoryBrandRelation);

    /**
     * 获取分类关联的品牌
     * @param catId 分类ID
     * @return 当前分类下的品牌
     */
    List<BrandEntity> getBrandsByCatId(Long catId);
}

